/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

// written by Andy Reagan, 08/09/13
// this mesh defines a fully 3-dimensional hula hoop


FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.1; // specifications in .1 meters (deca meters?)

vertices
(
    // 16 vertices for the loop (x y z)
    // top four
    (0 0 34.5) //0
    (1.5 0 36) //1
    (0 0 37.5) //2
    (-1.5 0 36) //3
    // left four
    (0 -34.5 0) //4
    (1.5 -36 0) //5
    (0 -37.5 0) //6
    (-1.5 -36 0) //7
    // bottom four 
    (0 0 -34.5) //8
    (1.5 0 -36) //9
    (0 0 -37.5) //10
    (-1.5 0 -36) //11
    // right four 
    (0 34.5 0) //12
    (1.5 36 0) //13
    (0 37.5 0) //14
    (-1.5 36 0) //15
    // python blockMeshDictHelper.py arc -1.5 0 36 -1.5 -36 0 -1.5 0 -36 -1.5 36 0 3 7 11 15 
);

blocks
(
    // block 1, upper left
    //hex (7 6 4 5 3 2 0 1) (1 30 300) simpleGrading (1 1 1)
    hex (6 5 4 7 2 1 0 3) (30 30 300) simpleGrading (1 1 1)
    // block 2, lower left
    hex (7 4 5 6 11 8 9 10) (30 30 300) simpleGrading (1 1 1)
    // block 3, lower right
    hex (15 14 13 12 11 10 9 8) (30 30 300) simpleGrading (1 1 1)
    // block 4, upper right
    hex (12 13 14 15 0 1 2 3) (30 30 300) simpleGrading (1 1 1)
);

// define the arcs of the loop
edges
(
    // top circle python blockMeshDictHelper.py arc 0 0 34.5 1.5 0 36 0 0 37.5 -1.5 0 36 0 1 2 3
    arc 0 1 (1.0606601717798212 0.0 34.93933982822018)
    arc 1 2 (1.0606601717798212 0.0 37.06066017177982)
    arc 2 3 (-1.0606601717798212 0.0 37.06066017177982)
    arc 3 0 (-1.0606601717798212 0.0 34.93933982822018)
    // left circle  python blockMeshDictHelper.py arc 0 -34.5 0 1.5 -36 0 0 -37.5 0 -1.5 -36 0 4 5 6 7
    arc 4 5 (1.0606601717798212 -34.93933982822018 0.0)
    arc 5 6 (1.0606601717798212 -37.06066017177982 0.0)
    arc 6 7 (-1.0606601717798212 -37.06066017177982 0.0)
    arc 7 4 (-1.0606601717798212 -34.93933982822018 0.0)
    // bottom cicle python blockMeshDictHelper.py arc 0 0 -34.5 1.5 0 -36 0 0 -37.5 -1.5 0 -36 8 9 10 11
    arc 8 9 (1.0606601717798212 0.0 -34.93933982822018)
    arc 9 10 (1.0606601717798212 0.0 -37.06066017177982)
    arc 10 11 (-1.0606601717798212 0.0 -37.06066017177982)
    arc 11 8 (-1.0606601717798212 0.0 -34.93933982822018)
    // right circle python blockMeshDictHelper.py arc 0 34.5 0 1.5 36 0 0 37.5 0 -1.5 36 0 12 13 14 15
    arc 12 13 (1.0606601717798212 34.93933982822018 0.0)
    arc 13 14 (1.0606601717798212 37.06066017177982 0.0)
    arc 14 15 (-1.0606601717798212 37.06066017177982 0.0)
    arc 15 12 (-1.0606601717798212 34.93933982822018 0.0)

    // now for the big circles python blockMeshDictHelper.py arc 0 0 34.5 0 -34.5 0 0 0 -34.5 0 34.5 0 0 4 8 12
    arc 0 4 (0.0 -24.395183950935888 24.395183950935888)
    arc 4 8 (0.0 -24.395183950935888 -24.395183950935888)
    arc 8 12 (0.0 24.395183950935888 -24.395183950935888)
    arc 12 0 (0.0 24.395183950935888 24.395183950935888)
    // front python blockMeshDictHelper.py arc 1.5 0 36 1.5 -36 0 1.5 0 -36 1.5 36 0 1 5 9 13
    arc 1 5 (1.5 -25.45584412271571 25.45584412271571)
    arc 5 9 (1.5 -25.45584412271571 -25.45584412271571)
    arc 9 13 (1.5 25.45584412271571 -25.45584412271571)
    arc 13 1 (1.5 25.45584412271571 25.45584412271571)
    // outside python blockMeshDictHelper.py arc 0 0 37.5 0 -37.5 0 0 0 -37.5 0 37.5 0 2 6 10 14
    arc 2 6 (0.0 -26.51650429449553 26.51650429449553)
    arc 6 10 (0.0 -26.51650429449553 -26.51650429449553)
    arc 10 14 (0.0 26.51650429449553 -26.51650429449553)
    arc 14 2 (0.0 26.51650429449553 26.51650429449553)
    // back python blockMeshDictHelper.py arc -1.5 0 36 -1.5 -36 0 -1.5 0 -36 -1.5 36 0 3 7 11 15 
    arc 3 7 (-1.5 -25.45584412271571 25.45584412271571)
    arc 7 11 (-1.5 -25.45584412271571 -25.45584412271571)
    arc 11 15 (-1.5 25.45584412271571 -25.45584412271571)
    arc 15 3 (-1.5 25.45584412271571 25.45584412271571)
    
);

// recall they must be clockwise from the inside
boundary
(
    topinside
    {
        type wall;
        faces
        (
	    (0 1 5 4)
	    (4 7 3 0)
	    (0 3 15 12)
	    (1 0 12 13)
	 );
    }
    topoutside
    {
         type wall;
	 faces
	 (
	     (1 2 6 5)
	     (7 6 2 3)
	     (3 2 14 15)
	     (2 1 13 14)
	  );
    }
    bottominside
    {
        type wall;
	faces
	(
	    (4 8 11 7)
	    (4 5 9 8)
	    (11 8 12 15)
	    (8 9 13 12)
	 );
    }
    bottomoutside
    {
        type wall;
	faces
	(
            (5 6 10 9)
	    (6 7 11 10)
	    (10 11 15 14)
	    (9 10 14 13)
	 );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
